Recent developments in image processing technology, especially in digital image processing, have substantially increased the needs of high-speed processing and low power consumption.
In an image processing apparatus, for example, to generate a gray-level (gray-scale) histogram of an image, pixels composing the image are classified according to gray levels, and then the number of pixels of each gray level is counted to obtain a gray level distribution. In order to realize such a histogram processing by hardware, a conventional apparatus includes a memory and an adder incrementing data read from the memory. The memory is provided with a single port to be used commonly both for reading and writing data. In this kind of apparatus, when gray level data for each pixel are supplied as an address signal to the memory, the corresponding data are read from the memory through the port and are incremented by the adder. The incremented data are written to its original address through the port in the memory for renewal. This processing is carried out to each pixel, so that a gray level histogram of the image is finally generated. According to this kind of apparatus, it is difficult to realize real-time processing to an image, represented by a large amount of data, because data are read and written from/to the memory commonly through the single port.
Another conventional apparatus using a dual-port memory has been proposed in Japanese Laying-Open, Kokai H5-20456, although the detail of the apparatus will be later described in the following clause "Detailed Disclosure of the Invention". The apparatus includes a comparator comparing a current address signal with other address signals, provided prior to the current address signal, and a histogram calculator adding a certain number to data read from a memory. The comparator provides a control signal based on the result of comparison. In the apparatus, when the current address signal, that is current gray level data, is equal to either the other address signals, the histogram calculator changes the amount of number to be added to data read from the memory, in response to the control signal. The data, to which the calculation is performed, are written to its original address in said memory to renew the data. Thus processing is repeated so as to generate a gray level histogram of the image. According to this type of apparatus, reading and writing of data from/to the memory can be carried out simultaneously using the two ports; and therefore, real-time processing can be performed. However, electrical power consumption of this apparatus is not low enough, because reading and writing operations are carried out for every pixel of the image.